package controllers;

import constans.Parametr;

public class PlayerController {

	int points = Parametr.HPoints;
	int experience = 0;
	int totalExp = 0;
	int lvl = 0;
	
	int maxExperience = Parametr.HStartExperience;
	
	public void addExperience(int e)
	{
		experience += e;
		totalExp += e;
		if(experience == maxExperience)
		{
			experience = 0;
			lvl++;
			points++;
			if(maxExperience < Parametr.HMaxExperience)
			maxExperience++;
		}
	}
	public void subPoint()
	{
			points--;
	}
	public int getPoints()
	{
		return points;
	}
	public int getExperience() {
		return experience;
	}
	public int getMaxExperience() {
		return maxExperience;
	}
	public int getTotalExperience()
	{
		return totalExp;
	}
	
}
